home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Apps / Utilities / Hardware / SCSItools / README < prev    next >
Text File  |  1992-12-26  |  5KB  |  84 lines

  1.  
  2. This is a collection of SCSI tools/utilities that I use that may be of interest to others.
  3.  
  4. setmtd.c -     set SCSI tape driver to a fixed block size
  5.             by John L. Chmielewski
  6.             by David D. Johnson (ddj@gradient.com)
  7.             
  8. mtset.c  -     set SCSI tape driver characteristics
  9.             by John L. Chmielewski
  10.             by David D. Johnson (ddj@gradient.com)
  11.             by Charles Chambers
  12.             
  13.             
  14. sense.c  -     Generates listing of SCSI sense mode pages for SCSI disk which
  15.         can be used by select program to modify SCSI disk parameters  
  16.         (like sector size among other things).
  17.             by Charles Chambers
  18.  
  19. select.c  -     SCSI select mode pages for SCSI disk, output from sense
  20.         program can be used to modify SCSI disk parameters (like sector
  21.         size among other things). Checks for consistency between disk
  22.         and input parameters.
  23.             by Charles Chambers
  24.  
  25. inquire.c -    SCSI inquire listing of all SCSI devices on bus.            
  26.             by Charles Chambers
  27.             
  28.  
  29. Various notes:
  30. ===========================================================================
  31. Notes on inquire,sense,select:
  32.  
  33. FIRST, USE AT YOUR OUR RISK. I NOT NOT BE RESPONSIBLE FOR PROBLEM CAUSED BY THESE PROGRAMS.
  34.  
  35. Note that I have only tested these programs on a small number of drives (see PARAMETERS directories). BE CAREFUL, if you do not know what you are doing, then I recommend that you not use it. But it is very useful for those people that do know.
  36.  
  37. I received a Maxtor XT8760 that had been formatted for 512 byte sectors. I wished to change this to the 1024 byte sectors, but lacked the tools. So, when
  38. Roy Bolters SCSI formatter claimed to reformat for 1024 byte sector, I thought
  39. to try it on the Maxtor. Well, it made it unusable. I then read the notes with Roy program and it did not claim to work with the Maxtor XT-8760. So, having no recourse, I wrote a simple program that would dump the scsi sense mode parameters, and used it on a NeXT formatted Maxtor. Using the dump, I then wrote another program to set the third party Maxtor to the NeXT formatted Maxtor's parameters. These programs have been cleaned up some to alert about parameter differences (so you can check them). I thought about adding a NeXTstep interface on them, but scsi disk formatting is not the sort of thing to be doing on the system in multiuser mode, so I kept it so that it can be used in single user mode. For the same reason I added the inquire program as well, its something that you use to test for SCSI devices recognized by the system. The idea was to have a set of scsi tools, but keep it simple. To use the sense/select programs:
  40.  
  41. On a system with a drive formatted like you wish to "copy":
  42.  
  43. sense -t <original target> -l <lun> -p 63 > drive.sense
  44.  
  45. you can now edit the "drive.sense" file, if you like, to make changes
  46. for destination drive formatting. The "sense" file contains a "SCSI inquire" of the original drive and a "SCSI mode sense" for all scsi mode pages.
  47.  
  48. Now, use sense on the destination drive to set it's setup:
  49.  
  50. select -t <destination target> -l <lun> -p 63 > save.sense
  51.  
  52. Now, reselect the destination drive with the "sense" file as follows:
  53.  
  54. select -t <destination target> -l <lun> -f drive.sense
  55.  
  56. The select programs does a "SCSI inquire" of the destination drive and compares
  57. it to the data in the "sense" file. If they do not match, you should get messages alerting you to the fact, and requires you respond before continuing.
  58. It then does a "SCSI sense" of the destination drive and compares it with the
  59. "sense" file. It should check for data masks, and data values for inconsistencies and any parameter changes are reported. Then, before the "SCSI select" of the destination drive with the changed data, you are require to respond. The "SCSI select" writes the data to the current data field, so no parameters are save if the drive is powered off at this point. If you format the drive now, the parameter are then saved into the "saved" data field.
  60. I use NeXT's "disk" program to perform the format. If the new set of parameters
  61. do not work, then reselect the drive with the "save.sense" data file, reformat, and you are back to where you started.
  62.  
  63. ===========================================================================
  64. Notes on mtset:
  65.  
  66. I would recommend check the man page for the "st". It was my main source of tape configuration information. The mtset is a general propose version of setmtd. I was interested in using the variable block mode of my ARCHIVE Python DAT tape drive, so I added the -i mode switch to the program.
  67.  
  68. Variable block tape, but inhibit illegal length reporting. This allows you to
  69. read tape with variable length blocks written on it. Very useful, if you were not using the fix block tape mode when you dumped your filesystem, are interested in using restore to read the tape. This is the mode that I use with my Archive Python DAT drive:
  70.  
  71. mtset -d /dev/nrst0 -i
  72.  
  73. Fix block tape with 512-byte records. Some tape drive only allow constant size blocks to be written. This causes the scsi tape driver to write in fix block mode. The last partial block written will be padded with zeroes to make a complete block.
  74.  
  75. mtset -d /dev/nrst0 -f
  76.  
  77. Fix block tape with 1024-byte records:
  78.  
  79. mtset -d /dev/nrst0 -f 1024
  80.  
  81. Reset to default scsi tape drive behavior
  82.         (Variable, allow illegal length reporting):
  83.     
  84. mtset -d /dev/nrst0